/**
 * create by ocean0 2018/06/03
 */
module.exports = function (url, opt, method) {
  return new Promise(function (resove, reject) {
    wx.request({
      url: url,
      data: opt || {},
      method: method,
      success(res) {
        resove(res.data);
      },
      fail(err) {
        console.log(err)
      }
    });
  });
}